<script setup lang="ts">
import { reactive, ref, onMounted, watch } from "vue";
import type { FormInstance, FormRules } from "element-plus";
import { Search } from "@element-plus/icons-vue";
import { useRouter, useRoute } from "vue-router";

import { vulScan } from "@/api/task";
import { message } from "@/utils/message";
import { copyTextToClipboard } from "@pureadmin/utils";
defineOptions({
  name: "Refund",
});

const dataList = ref([
  {
    name: "部门1",
    num: 900,
    amount: 900,
  },
  {
    name: "部门2",
    num: 800,
    amount: 800,
  },
  {
    name: "部门3",
    num: 700,
    amount: 700,
  },
  {
    name: "部门4",
    num: 600,
    amount: 600,
  },
  {
    name: "部门5",
    num: 500,
    amount: 500,
  },
  {
    name: "部门6",
    num: 900,
    amount: 900,
  },
  {
    name: "部门7",
    num: 800,
    amount: 800,
  },
  {
    name: "部门8",
    num: 700,
    amount: 700,
  },
  {
    name: "部门9",
    num: 600,
    amount: 600,
  },
  {
    name: "部门10",
    num: 500,
    amount: 500,
  },
]);

// watch(showAddHardwareDialog, (newVal, oldVal) => {
//   // resetAddTaskForm();
// });

onMounted(() => {});
</script>

<template>
  <div class="lawyer-refund-wrap">
    <h3 class="refund-header">部门排名</h3>
    <div class="content">
      <div
        v-for="(item, index) in dataList"
        :key="index"
        :style="{ width: `calc(100% - ${(index + 1) * 10}px)` }"
        class="card-item"
      >
        <div class="left">
          <div class="number">{{ index + 1 }}</div>
          <div class="team-name">{{ item.name }}</div>
        </div>
        <div class="right">
          <div class="case-num">
            未报备资产：<span>{{ item.num }}</span
            >个
          </div>
          <div class="refund-money">总资产：{{ item.amount }}个</div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
:deep(.el-card__header) {
}

:deep(.el-pagination) {
  justify-content: right;
  margin-top: 10px;
  margin-right: 30px;
}

.lawyer-refund-wrap {
  background: #fff;
  border: 1px solid #ebeaf0;
  border-radius: 4px;

  .refund-header {
    padding: 15px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #ebeaf0;
  }
  .content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 15px;
    .card-item {
      position: relative;
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: space-between;
      // background-color: #e7ebf1;
      background-color: rgb(239, 250, 255);
      padding: 6px 50px 6px 10px;
      border-radius: 4px;
      &::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        border-bottom: 40px solid white;
        border-left: 10px solid transparent;
      }
      &:nth-child(1) {
        .number,
        .team-name,
        .case-num > span {
          color: red;
        }
      }
      &:nth-child(2) {
        .number,
        .team-name,
        .case-num > span {
          color: #e5794a;
        }
      }
      &:nth-child(3) {
        .number,
        .team-name,
        .case-num > span {
          color: #2893e0;
        }
      }
      .left,
      .right {
        display: flex;
      }
      .number {
        margin-right: 10px;
      }
      .team-name {
        margin-right: 100px;
      }
      .case-num {
        margin-right: 20px;
      }
      .refund-money {
      }
    }
  }
}
</style>
